/*!
 * \file GapEventMediaBearerSetupCfm.h
 * \brief Event carrying message GapMediaBearerSetupCfm
 */

#ifndef SGW_GAP_EVENT_MEDIA_BEARER_SETUP_CFM_H
#define SGW_GAP_EVENT_MEDIA_BEARER_SETUP_CFM_H

#include "EventData.h"
#include "GapGlobals.h"
#include "GAP.pb.h"

namespace tsc
{
namespace sgw
{

using GatewayApplicationPart::GapMediaBearerSetupConfirm;

/**
 * Event indicating that MGW and have accepted setting up of media bearer
 * and it's ready to start media transmission
 */
class GapEventMediaBearerSetupCfm : public common::EventData
{
public:

    GapEventMediaBearerSetupCfm(
            GapMediaBearerSetupConfirm& bearerSetupCfm) :
		EventData(GAP_MEDIA_BEARER_SETUP_CFM),
		mConnectionId(bearerSetupCfm.connectionid()),
		mServerMediaPort(bearerSetupCfm.servermediaport())
	{

	}

	virtual ~GapEventMediaBearerSetupCfm()
	{

	}

	uint32_t getConnectionId() const
	{
		return mConnectionId;
	}

	uint32_t getServerMediaPort() const
	{
	    return mServerMediaPort;
	}

private:
	uint32_t mConnectionId;
	uint32_t mServerMediaPort;
};

} // namespace sgw
} // namespace tsc

#endif // SGW_GAP_EVENT_MEDIA_BEARER_SETUP_CFM_H
